<template>
  <div>
    <div class="pageBox">
      <div class="pageLeft" v-if="isLeftBox">
        <yu-router-view></yu-router-view>
      </div>
      <div :class="[isLeftBox ? 'pageRight' : 'pageRight1']">
        <div class="packUpBtn" @click="isLeftBox = !isLeftBox">
          <i title="收起左侧菜单" v-if="isLeftBox" class="el-icon-d-arrow-left"></i>
          <i title="展开左侧菜单" v-else class="el-icon-d-arrow-right"></i>
        </div>
        <keep-alive>
          <router-view />
        </keep-alive>
      </div>
    </div>
  </div>
</template>
<script>
import yuRouterView from "@/views/components/yu-router-view/yu-router-view.vue";

export default {
  components: { yuRouterView },
  data() {
    return {
      isLeftBox: true,
    };
  },

  mounted() {},
  methods: {},
};
</script>

<style scoped lang="scss">
.pageBox {
  display: flex;
  width: 100%;
  height: calc(100vh - 50px);
  .pageLeft {
    padding-top: 12px;
    width: 200px;
    height: 100%;
    border-right: 1px solid #eee;
    overflow-y: auto;
  }
  .pageRight {
    width: calc(100% - 200px);
    position: relative;
  }
  .pageRight1 {
    width: 100%;
    position: relative;
  }
  .packUpBtn {
    position: absolute;
    width: 15px;
    height: 35px;
    text-align: center;
    line-height: 35px;
    background-color: #1296db;
    left: 0;
    bottom: 40px;
    z-index: 1000;
    font-size: 10px;
    color: #ffffff;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    &:hover{
    // background-color: #d6d6d6;
    }
  }
}
</style>
